package com.itheima.springbootquickstart.controller;

import com.itheima.springbootquickstart.pojo.EmailProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    private EmailProperties emailProperties;
    @RequestMapping("/hello")
    public String hello()
    {
        return "hello world~~ ";
    }

    @RequestMapping("/config")
    public String getConfig() {
        return emailProperties.user+"-"+emailProperties.code+"-"+emailProperties.host+"-"+emailProperties.auth;
    }
}
